﻿using Sino.CapacityCloud.WebApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Sino.CapacityCloud.Repositories.Models
{

    [Flags]
    public enum CertificationProgress
    {
        Avater = 0x03,
        IdentityCard = 0x0C,
        DrivingLicense = 0x30,
        VehicleLicense = 0xC0
    }

    public static class CertificationProgressExtensions
    {

        public static IDictionary<string, CertificationStatus> ExtractStatus(this CertificationProgress self, int value)
        {
            var dic = new Dictionary<string, CertificationStatus>();
            var fields = Enum.GetNames(typeof(CertificationProgress)).Select(x => new KeyValuePair<string, int>(x, (int)Enum.Parse(typeof(CertificationProgress), x))).ToArray();
            foreach (var item in fields)
            {
                var mask = item.Value;
            }
            return dic;
        }

    }

}